<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;


class CreatePowerTypesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('power_types', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('算力类型');
            $table->string('comment')->default('')->comment('备注');
            $table->timestamps();
        });

        DB::statement("ALTER TABLE `power_types` comment '算力类型表';");

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('power_types');
    }
}
